s = input("请输入一个字符串（只能包括字母、数字、空格 ：")
res =True
if s.isspace()is False:
    mid_01 = s.replace(" ","")
    mid_2 = mid_01.lower()
    if mid_2.isalnum() is False:
        print("含有非法字母，验证失败！！！")
    else:
        begin = 0
        end = len(mid_2) - 1
        while begin < end:
            if mid_2[begin] != mid_2[end]:
                res = False
                break
            begin += 1
            end -= 1
        print(res)
else:
    print(res)

